/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kleintjes.behavioral.mediator_pattern.model;

/**
 *
 * @author Hughan.Kleintjes.hughanK@gmail.com
 */
public class Buyer {
    protected Mediator mediator;
    protected String unitOfCurrency;
    
    public Buyer(Mediator mediator, String unitOfCurrency) {
        this.mediator = mediator;
        this.unitOfCurrency = unitOfCurrency;
    }
    
    public boolean attemptToPurchase(float bid) {
        System.out.println("Buyer attempting a bid of "+bid+" "+unitOfCurrency);
        return mediator.placeBid(bid, unitOfCurrency);
    }
    
    
}
